/* 
 * Change Record
 * --------------------------------------------
 * Date				User			Description
 * --------------------------------------------
 * Oct 2007			IOJohnso5962	created
 *
 */
package awesome.Manager;

import java.io.ByteArrayOutputStream;

/**
 * User database object
 * 
 */
public class Picture {
	
	private int id = 0;
	private int submittedBy = 0;
	
	private String caption = null;
	private String imageFileName = null;

	private int imageWidth = 0;
	private int imageHeight = 0;
	private String thumbFileName = null;

	private int thumbWidth = 0;
	private int thumbHeight = 0;

	String dbImagePath;
	String dbThumbPath;
	private String regularFileName = "";
	
	/**
	 * 
	 * Constructor for Picture that takes in image file names
	 */
	public Picture(int submittedBy,
				String caption, 
				int imageWidth, int imageHeight,
				int thumbWidth, int thumbHeight,
				String imageFileName, String thumbFileName, String regularFileName, String dbImagePath,
				String dbThumbPath){
		
		this.submittedBy = submittedBy;
		
		this.caption = caption;
		this.imageWidth = imageWidth;
		this.imageHeight = imageHeight;
		this.thumbWidth = thumbWidth;
		this.thumbHeight = thumbHeight;
		this.imageFileName = imageFileName.replace("\\", "\\\\");
		this.thumbFileName = thumbFileName.replace("\\", "\\\\");	
		this.regularFileName = regularFileName;
	
		this.dbImagePath = dbImagePath.replace("\\", "\\\\");;
		this.dbThumbPath = dbThumbPath.replace("\\", "\\\\");;
	
	}
	
	public String getDBImage()
	{
		return this.dbImagePath;
	}
	
	public String getDBThumb()
	{
		return this.dbThumbPath;
	}

	


	public String getRegularFileName() {
		return regularFileName;
	}
	/**
	 * @return Returns the id.
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id The id to set.
	 */
	public void setId(int id) {
		this.id = id;
	}


	/**
	 * @return Returns the imageHeight.
	 */
	public int getImageHeight() {
		return imageHeight;
	}
	/**
	 * @param imageHeight The imageHeight to set.
	 */
	public void setImageHeight(int imageHeight) {
		this.imageHeight = imageHeight;
	}
	/**
	 * @return Returns the imageWidth.
	 */
	public int getImageWidth() {
		return imageWidth;
	}
	/**
	 * @param imageWidth The imageWidth to set.
	 */
	public void setImageWidth(int imageWidth) {
		this.imageWidth = imageWidth;
	}
	/**
	 * @return Returns the submittedBy.
	 */
	public int getSubmittedBy() {
		return submittedBy;
	}
	/**
	 * @param submittedBy The submittedBy to set.
	 */
	public void setSubmittedBy(int submittedBy) {
		this.submittedBy = submittedBy;
	}


	/**
	 * @return Returns the thumbHeight.
	 */
	public int getThumbHeight() {
		return thumbHeight;
	}
	/**
	 * @param thumbHeight The thumbHeight to set.
	 */
	public void setThumbHeight(int thumbHeight) {
		this.thumbHeight = thumbHeight;
	}
	/**
	 * @return Returns the thumbWidth.
	 */
	public int getThumbWidth() {
		return thumbWidth;
	}
	/**
	 * @param thumbWidth The thumbWidth to set.
	 */
	public void setThumbWidth(int thumbWidth) {
		this.thumbWidth = thumbWidth;
	}
	/**
	 * @return Returns the title.
	 */
	public String getCaption() {
		return caption;
	}
	/**
	 * @param title The title to set.
	 */
	public void setCaption(String caption) {
		this.caption = caption;
	}
	/**
	 * @return Returns the imageFileName.
	 */
	public String getImageFileName() {
		return imageFileName;
	}
	/**
	 * @param imageFileName The imageFileName to set.
	 */
	public void setImageFileName(String imageFileName) {
		this.imageFileName = imageFileName;
	}
	/**
	 * @return Returns the thumbFileName.
	 */
	public String getThumbFileName() {
		return thumbFileName;
	}
	/**
	 * @param thumbFileName The thumbFileName to set.
	 */
	public void setThumbFileName(String thumbFileName) {
		this.thumbFileName = thumbFileName;
	}
}
